package com.dameng.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SystemMenu extends Model<SystemMenu> {
    @TableId(type = IdType.ASSIGN_UUID)
    private String menuId;
    private String pid;
    private String name;
    private String menuType;
    private String urlRequest;
    private String menuStyle;
    private String target;
    private Boolean status;// 启动1，禁用0
    private String note;
    private Integer sortNo;
    @TableField(exist = false)
    private List<SystemRole> systemRoles; // 菜单链接对应的角色列表
    @TableField(exist = false)
    private boolean checked; // 角色菜单

    @Override
    protected Serializable pkVal() {
        return this.menuId;
    }
}
